package me.GJxunhuan;

import java.util.Random;
import java.util.Scanner;

public class Test6 {
    public static void main(String[] args) {
        Random r = new Random();
        int a = r.nextInt(100) + 1;
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("请输入一个数字");
            int b = sc.nextInt();
            if (a > b) {
                System.out.println("猜小了");
            } else if (b > a) {
                System.out.println("猜大了");
            } else {
                System.out.println("猜对了");
                break;
            }
        }
    }
}
